package starter;

import java.io.File;

import jexxus.server.Server;

import eolympics.Game;
import eolympics.MiniGamePluginsLoader;
import eolympics.server.GameServer;
import gui.MainFrame;

public class DependencyInjector
{
    private MainFrame mMainFrame;

    public DependencyInjector()
    {
        createObjects();
    }

    private void createObjects()
    {
        File miniGamesFolder = new File("");
        MiniGamePluginsLoader miniGamePluginsLoader = new MiniGamePluginsLoader(miniGamesFolder);

        Server server = new Server(GameServer.PORT);
        GameServer gameServer = new GameServer(server);
        Game game = new Game(miniGamePluginsLoader, gameServer);

        mMainFrame = new MainFrame(game);
    }

    public MainFrame getMainFrame()
    {
        return mMainFrame;
    }

}
